
AC_PREREQ([2.69])
AC_INIT([vega], [1.0], [vladimitriu@gmail.com])
AM_INIT_AUTOMAKE([-Wall -Werror])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS([config.h])

AC_PROG_CC

AC_PROG_INSTALL

have_pthreads=no
AC_SEARCH_LIBS([pthread_create], [pthread], [have_pthreads=yes])

AC_CHECK_HEADERS([stdlib.h string.h stdint.h])

if test "x${have_pthreads}" = xyes; then
	AC_CHECK_HEADERS([pthread.h], [], [have_pthreads=no])
fi

if test "x${have_pthreads}" = xno; then
	AC_MSG_WARN([
  ----------------------------------------
   Unable to find pthreads on this system
     Building a single-threaded version
  ----------------------------------------])
fi

AC_CONFIG_FILES([Makefile
                 src/Makefile])
AC_OUTPUT
